#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QtGui/QMainWindow>
#include <QMap>
#include <QLabel>
#include <QPainter>
#include <QVariant>
#include <QCursor>
#include <QTextStream>
#include <QFile>
#include <QFileInfo>
#include <QColor>
#include <QBitmap>
#include <QImage>
#include <QPixmap>
#include <QHash>
#include <QAction>
#include <QVariant>
#include <QMenu>
#include <QIcon>
#include <QDebug>
#include <QDir>
#include <QDirIterator>
#include <QSettings>
#include <QDirModel>
#include <QTreeView>
#include <QStringList>
#include <QListWidget>
#include <QTreeWidget>
#include <QTranslator>
#include <QtCore/QCoreApplication>
#include <QSqlDatabase>
#include <QSqlError>
#include <QSqlQuery>
#include <QDataWidgetMapper>
#include <QDebug>
#include <QSqlQueryModel>
#include <QSqlTableModel>
#include <QSqlRelationalTableModel>
#include <QSqlRelationalDelegate>
#include <QListWidgetItem>
#include <QToolTip>
#include <QProcess>
#include <QTextStream>
#include <QFileDialog>
#include <QMenu>
#include <QAction>
#include <QGridLayout>
#include <QPushButton>
#include <QLineEdit>
#include <QLabel>
#include <QSizeGrip>
#include <QStringList>



namespace Ui
{
    class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = 0);
    ~MainWindow();
    void ParseApplications () ;
    QString FindBestIcon ( QString icon ) ;
    void RefreshCat();

    QList<QString> *name_list;
    QList<QString> *gen_name_list;
    QList<QString> *exec_list;
    QList<QString> *args_list;
    QList<QString> *app_name_list;
    QList<QString> *icon_path_list;
    QList<QString> *categories_list;
    QList<QString> *full_path_list;
    QSqlRelationalTableModel *model ;
    int save_id;
    QString cat ;

    QMainWindow * editwin ;
    QWidget     * central ;
    QGridLayout * layout ;
    QLineEdit   * nom_box ;
    QLabel      * label1 ;
    QLineEdit   * exe_box;
    QLabel      * label2 ;
    QLineEdit   * ico_box ;
    QLabel      * label3 ;
    QPushButton * cancelbutton ;
    QPushButton * validbutton ;

public slots :
    void UpdateCat( QTreeWidgetItem*  ,int  ) ;
    void ProgramEntryDblClicked(QListWidgetItem* entry) ;
    void ExecuteCommande();
    void PrependAdminCommande();
    void JoinFileCommande();
    void LaunchPackageManager();
    void LaunchControlCenter();
    void LaunchNetwork();
    void LaunchMyComputer();
    void LaunchMyHome();
    void LaunchMyTrash();
    void ShowMyFavorites();
    void on_actionAjouter_aux_favoris_triggered();
    void SaveModif();

private:
    Ui::MainWindow *ui;


private slots:
    void on_actionEditer_triggered();
};

#endif // MAINWINDOW_H
